#ifndef __MUSICAL_SCAL_H
#define __MUSICAL_SCAL_H
#include "User_Def.h"
typedef enum {
  /*����*/
  DO_L = 0,
  RE_L,
  MI_L,
  FA_L,
  SO_L,//
  LA_L,//
  SI_L,
  /*����*/
  DO_M,//1
  RE_M,
  MI_M,
  FA_M,//
  SO_M,
  LA_M,
  SI_M,//7
  /*����*/
  DO_H,
  RE_H,
  MI_H,
  FA_H,
  SO_H,
  LA_H,
  SI_H,
}musicalScale_e;
typedef enum
{
  RECORD_NULL = 0,
  RECORD_START,
  RECORD_STARTED,
  RECORDING,
  RECORD_STOP,
  RECORD_REPALY,
} recordState_t;
typedef enum {
  REPLAY_NULL = 0,
  REPLAY_START,
  REPLAY_PLAYING,
  REPLAY_STOP,
  REPLAY_NEXT,
  REPLAY_LOOP,
  REPLAY_WAITE,
  REPLAY_STOPPING,
}replayState_t;
extern recordState_t recordState;
extern replayState_t replayState;
void speak_output_freq(unsigned long freq);
unsigned char keyScan();
void speaker_ouput_musicalscal(musicalScale_e m);
void speakerSetFreq(uint16_t freq);
void speakerHandleTask();
void recordStart();
void recordStop();
void recordRecord(uint16_t key);
void musicRecordInit();
void recordAndReplayTask();
uint8_t isReplayNull();
uint8_t recordNumCount();


#endif